package com.gientech.spring.mq;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
@EnableApolloConfig
public class TestController {

    @Autowired
    private MessageProducer messageProducer;

    @GetMapping("send")
    public void get(){
        messageProducer.sendMessage("我发送了一条消息.");
    }
}
